<?php
$htmlOptions = array(
  'id'    => 'search-box',
  'class' => 'content-box',
  'style' => '',
);

if (SpsState::hasState('search'))
    $htmlOptions['style'] = 'background:#e5ecf9 none;border:1px solid #aac6e8;';
else
    $htmlOptions['style'] = 'background:#e5ecf9 none;border:1px solid #aac6e8;display:none;';

echo CHtml::openTag('div', $htmlOptions);
?>
<?php
$form = $this->beginWidget('CActiveForm', array(
  'action'      => Yii::app()->createUrl($this->route),
  'method'      => 'get',
  'id'          => 'search-form',
  'htmlOptions' => array('class' => 'form'),
  ));
?>
<ul>
    <li>
        <?php echo $form->label($model, 'title', array('class' => 'search-label')); ?>
        <?php echo $form->textField($model, 'title', array('class' => 'text medium')); ?>
        <?php
        $data   = DNewsletterType::model()->getMenu();

        $this->widget('ArrayToDropDownList', array(
          'model'         => $model,
          'attribute'     => 'type_id',
          'data'          => $data,
          'parentId'      => 3,
          'disableParent' => true,
          'emptyOption'   => '- all -',
          'selected'      => $model->getAttribute('type_id'),
          'htmlOptions'   => array(
            'class' => 'select',
            'style' => 'width:150px;',
          )
        ));
        ?>
        <?php
        $data   = Yii::t('DadminModule.app', 'select_activated_flag');
        echo $form->dropDownList($model, 'activated_flag', $data, array(
          'empty' => '- status -',
          'class' => 'select',
          'style' => 'width:85px',
          )
        );
        ?>
    </li>

    <li>
        <div style="margin:auto; width:75px;">
<?php
echo CHtml::link(
  '<span class="ui-icon ui-icon-arrowreturn-1-e"></span>SUBMIT', 'javascript:void(0)', array(
  'id'    => 'btn-submit',
  'class' => 'btn ui-state-default ui-corner-all',
  )
)
?>
        </div>
    </li>
</ul>
            <?php $this->endWidget(); ?>
<?php echo CHtml::closeTag('div'); ?>